/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.support.systemmessage;

import org.json.JSONObject;

public class a {
    public String a = null;
    public String b = null;
    public String c = null;
    public String d = null;
    public boolean e = false;
    public int f = 2;
    public String g = null;

    public boolean equals(Object paramObject) {
        if (null == paramObject)
            return false;
        if (paramObject instanceof a) {
            a locala = (a) paramObject;
            return this.a.equals(locala.a);
        }
        return false;
    }

    public void a(JSONObject paramJSONObject) {
        try {
            this.a = paramJSONObject.optString("id", "");
            this.b = paramJSONObject.optString("title", "");
            this.c = paramJSONObject.optString("content", "");
            this.d = paramJSONObject.optString("time", "");
            this.f = paramJSONObject.optInt("status", 2);
            this.e = (this.f == 3);
            this.g = paramJSONObject.optString("url", "");
        } catch (Exception localException) {
            com.qihoo.gamecenter.sdk.support.g.a.c("SystemMessage", new Object[] { localException.toString() });
        }
    }

    public String toString() {
        try {
            JSONObject localJSONObject = new JSONObject();
            localJSONObject.put("id", this.a);
            localJSONObject.put("title", this.b);
            localJSONObject.put("content", this.c);
            localJSONObject.put("time", this.d);
            localJSONObject.put("status", this.f);
            localJSONObject.put("url", this.g);
            return localJSONObject.toString();
        } catch (Exception localException) {
            com.qihoo.gamecenter.sdk.support.g.a.c("SystemMessage", new Object[] { localException.toString() });
        }
        return null;
    }
}